{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">会员等级管理</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <form action="" method="post" class="ajax-form">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">编号</th>
                        <th>等级名称</th>
                        <th>等级描述</th>
                        <th>等级价格</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {if condition="$data->toArray()['data']"}
                    {foreach name="data" item="vo"}
                    <tr>
                        <td>{$vo.level}</td>
                        <td>{$vo.level_name}</td>
                        <td>{$vo.level_desc}</td>
                        <td style="width:60px;">{$vo.level_price}</td>
                        <td style="width:90px;">
                            <a href="{:url('admin/member_level/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
                        </td>
                    </tr>
                    {/foreach}
                    {else/}
                    <tr>
                        <td colspan="15" style="text-align: center;"><i class="fa fa-exclamation-circle"></i>没有数据</td>
                    </tr>
                    {/if}
                    </tbody>
                </table>
                <!--分页-->
                {$page}
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script>
    $('.after').on('click',function(){
        var id = $(this).data('id');
        layer.open({
            type: 2,
            title: '该会员等级的后续课程',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '30%'],
            content: ['/admin/member_level/after/member_level_id/'+id,'no'] 
          });
    })
     
</script>    
{/block}